package com.mega.ycy.mixin;

import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.eventhandler.EventBus;
import net.minecraftforge.fml.common.eventhandler.IEventListener;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Mixin(value = EventBus.class, remap = false)
public interface EventBusAccessor {
    @Accessor("listeners")
    ConcurrentHashMap<Object, ArrayList<IEventListener>> listeners();

    @Accessor("listenerOwners")
    Map<Object, ModContainer> listenerOwners();
}
